package com.sumainfor.pc.market.controller.gmio;

import com.sumainfor.pc.market.service.gmio.GmioSearchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 服务管家工作台搜索
 * <p>
 *
 * @author: Mr.Wang
 * @create: 2019-08-05 18:18
 **/
@Controller
@RequestMapping("/provider/key/gmioSearch")
public class GmioSearchController {

    @Autowired
    GmioSearchService gmioSearchService;

    /**
     * 根据租客姓名或者手机号查询租客详情
     * @author zhoucong
     * @data 2019/9/19
     * @Param
     * @return
     */
    @ResponseBody
    @PostMapping("/getTenByPhone")
    public List<Map<String, Object>> getTenByPhone(@RequestParam String search){
        return gmioSearchService.getTenByPhone(search);
    }



    /**
     * 根据项目编号，项目名称，房源编号获取训房列表
     * @author zhoucong
     * @data 2019/9/19
     * @Param
     * @return
     */
    @ResponseBody
    @PostMapping("/getFugjTrainingList")
    public List<Map<String,Object>> getFugjTrainingList(@RequestParam String search){
        return gmioSearchService.getFugjTrainingList(search);
    }
    
    
    /**
     * 根据项目编号，项目名称，楼号，室号 获取房源集合
     * @author zhoucong
     * @data 2019/9/20
     * @Param 
     * @return 
     */
    @ResponseBody
    @PostMapping("/getFumsHouInfoList")
    public List<Map<String,Object>> getFumsHouInfoList(@RequestParam String search){
        return gmioSearchService.getFumsHouInfoList(search);
    }


    /**
     * 根据项目编号，项目名称，楼号，室号 获取房源集合
     * @author zhoucong
     * @data 2019/9/20
     * @Param
     * @return
     */
    @ResponseBody
    @PostMapping("/getZhzgHouIdList")
    public List<Map<String,Object>> getZhzgHouIdList(@RequestParam String search){
        return gmioSearchService.getZhzgHouIdList(search);
    }


    /**
     * 根据业主手机号获取业主信息
     * @author zhoucong
     * @data 2019/9/20
     * @Param
     * @return
     */
    @ResponseBody
    @PostMapping("/YyzlOwnerList")
    public List<Map<String,Object>> YyzlOwnerList(@RequestParam String search){
        return gmioSearchService.YyzlOwnerList(search);
    }

}
